def log_to_file(func):

    def wrapper(*args, **kwargs):
        import logging

        logging.basicConfig(filename='function_call.log', level=logging.INFO,
                            format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

        result = func(*args, **kwargs)
        logging.info(f"{func.__name__} 函数被调用，参数为：args={args}, kwargs={kwargs}")
        return result
    return wrapper